package Q3;

import java.util.HashSet;
import java.util.Scanner;
import java.util.Set;

public class Main {

    public static int n;
    public static int left;
    public static int right;
    public static String str;
    public static int ret;

    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);

        n = scanner.nextInt();
        left = scanner.nextInt();
        right = scanner.nextInt(); //[left, right]

        str = scanner.next();

        for (int i = 0; i < n; i++) {
            dfs(i, i, new HashSet<>());
        }

        System.out.println(ret);
    }

    public static void dfs(int start, int end, Set<Character> set) {
        if (set.size() >= left && set.size() <= right) {
            ret++;
        }

        if (end == n) {
            return;
        }

        set.add(str.charAt(end));
        dfs(start, end + 1, set);

    }
}
